package org.xiaobai.ai.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.xiaobai.ai.entity.ChatPaperDetailVO;
import org.xiaobai.ai.mapper.ChatPaperDetailMapper;
import org.xiaobai.ai.service.ChatPaperDetailService;

import java.util.List;

/**
 * @author dingfeng.xiao
 * @description
 * @date 2023/8/16 10:40
 */
@Service
public class ChatPaperDetailServiceImpl extends ServiceImpl<ChatPaperDetailMapper, ChatPaperDetailVO> implements ChatPaperDetailService {
    @Override
    public List<ChatPaperDetailVO> findByPaperId(Long paperId) {
        return list(new LambdaQueryWrapper<ChatPaperDetailVO>()
                .eq(ChatPaperDetailVO::getPaperId, paperId)
                .orderByAsc(ChatPaperDetailVO::getSort));
    }
}
